#!/bin/bash

#npm run asbuild
start1=$(date +%s%N)
npx asc assembly/sin_sum4.ts -o build/sin_sum4.wasm --optimizeLevel 3 --shrinkLevel 2 --converge
end1=$(date +%s%N)
elapsed1=$((($end1 - $start1)/1000000))
echo "Commands completed in $elapsed1 milliseconds."

start2=$(date +%s%N)
node --no-inspect sin_sum4.js
end2=$(date +%s%N)
elapsed2=$((($end2 - $start2)/1000000))
echo "Commands completed in $elapsed2 milliseconds."

elapsed3=$((($end2 - $start1)/1000000))
echo "Commands completed in $elapsed3 milliseconds."